﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xproject.Framework.Data;
using Xproject.Framework.Core.DataContext;
using Xproject.Framework.Core.UnitOfWork;
using System.Data.Entity;
using Xproject.Framework.Data.EF6;
using Model.Admin.Map;
using Model.WXshopBuiness.Map;
using Model.Util.Map;
using Model.WeiXin.Map;
using Model.ZXBuiness.Map;
using Model.Finance.Map;

namespace Repository.DataContexts.WXProjectAdmin
{
    public class WX_PlatformAdmin_DataContext : DataContext
    {

        static WX_PlatformAdmin_DataContext()
        {
            Database.SetInitializer<WX_PlatformAdmin_DataContext>(null);
        }

        public WX_PlatformAdmin_DataContext() : base("Name = Xproject_WeiXinAdmin")
        {
        }

        public override string Name
        {
            get
            {
                return "Xproject_WeiXinAdmin";
            }
        }

        protected override void UseEntityMap(DbModelBuilder pModelBuilder)
        {
            pModelBuilder.UserWeiXinTokenMap();
            pModelBuilder.UserWeiXinConfigMap();
            pModelBuilder.UserWeiXinUserMap();
           

            pModelBuilder.UserAdminMenuMap();
            pModelBuilder.UserAdminRoleMap();
            pModelBuilder.UserAdminRoleMenuMap();
            pModelBuilder.UserAdminUserMap();
            pModelBuilder.UserAdminUserRoleMap();

            pModelBuilder.UserCategoryMap();
            pModelBuilder.UserCategoryAttrMap();
            pModelBuilder.UserCategoryAttrGroupsMap();
            pModelBuilder.UserCategoryAttrValuesMap();
            

            pModelBuilder.UserWXProductMap();
            pModelBuilder.UserWeiXinOrderMap();
            pModelBuilder.UserProductContentsMap();
            pModelBuilder.UserProductCommentsMap();
            pModelBuilder.UserWeiXinProductAttrMap();

            pModelBuilder.UserAdvertisementMap();
            pModelBuilder.UserUploadFileMap();
            pModelBuilder.UserIdentityMap();

            pModelBuilder.UserAddressMap();
            pModelBuilder.UserPromotionsKanJiaDetailMap();
            pModelBuilder.UserUserProductKanJiaMap();
            pModelBuilder.UserPromotionsMap();
            pModelBuilder.UserOrderChangeHistoryMap();

            pModelBuilder.UserZXUserInfoMap();
            pModelBuilder.UserAccountBalanceMap();
            pModelBuilder.UserWeiXinMessageMap();
            pModelBuilder.UserUserOprateLogMap();
            pModelBuilder.UserUserCollectionMap();
            pModelBuilder.UserIndexCategoryMap();
            pModelBuilder.UserShoppingCarMap();
            pModelBuilder.UserProductSpecificationMap();
            pModelBuilder.UserZXOrderFenRunInfoMap();
            pModelBuilder.UserZXProductRateMap();
            pModelBuilder.UserZXUserFenRunMap();
            pModelBuilder.UserZXTiXianApplyMap();
        }
    }
}
